#ifndef PLC_CONF_H
#define PLC_CONF_H

#define PLC_MOD_EXT_SEL_GPIO gpiof
#define PLC_MOD_EXT_SEL_PIN GPIO_PIN_6
#define PLC_MOD_COM_SEL_GPIO gpiog
#define PLC_MOD_COM_SEL_PIN GPIO_PIN_11

#define PLC_RESULT_OK 0

#define PLC_CPU

#define PLC_FW_MAX_SIZE (10*1024*1024)

#define PLC_SYSTEM_OB_COUNT 45
#define PLC_FB_OFFSET PLC_SYSTEM_OB_COUNT

#define PLC_NETWORKS_IN_BLOCK_MAX (10 * 1024)
#define PLC_BLOCKS (PLC_SYSTEM_OB_COUNT + 10)
#define PLC_NETWORKS 20
#define PLC_DB_COUNT 10

#define PLC_TITLE_SIZE 64
#define PLC_COMMENT_SIZE 128

#define PLC_IO_SIZE (60 * 1024)
#define PLC_MEM_SIZE (1 * 1024 * 1024)
#define PLC_DB_MEM_SIZE (1 * 1024 * 1024)
#define PLC_LOCAL_SIZE (1024)
#define PLC_OB_DB_SIZE (1024)

#define PLC_NESTED_DEPTH 7

#define PLC_EDGE_AREA_MEM_OFFSET 0
#define PLC_EDGE_AREA_INPUT_OFFSET PLC_MEM_SIZE
#define PLC_EDGE_AREA_OUTPUT_OFFSET (PLC_EDGE_AREA_INPUT_OFFSET + PLC_IO_SIZE)
#define PLC_EGDE_AREA_SIZE (PLC_MEM_SIZE + PLC_IO_SIZE * 2)

#define PLC_NETWORK_END (-1)

#ifndef UNUSED
#define UNUSED(x) (void)(x)
#endif

#endif // PLC_CONF_H
